package BL;

import DAL.MD5;

public class User {			 //Class User
	
	private String nickName;	//Nickname
	private String firstName;	//Vorname
	private String secondName;	//Nachname
	private String mailAdress;	//Mail
	private String passWord;	//Passwort
	private String decodedPassword;
	
	public User(String nickname, String password, String vorname, String nachname, String mail){			//Konstruktor
		
		nickName = nickname;
		firstName = vorname;
		secondName = nachname;
		mailAdress = mail;
		passWord = password;
		
		MD5 decoder = new MD5();
		decodedPassword = decoder.decode(passWord);
        
	}
	
	public User(String nickname, String password){
		nickName = nickname;
		passWord = password;
	
		MD5 decoder = new MD5();
		decodedPassword = decoder.decode(passWord);
		System.out.print(decodedPassword);
	}
	
	//Getter and Setter

	public String getNickName() {
		return nickName;
	}
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getSecondName() {
		return secondName;
	}
	public void setSecondName(String secondName) {
		this.secondName = secondName;
	}
	public String getMailAdress() {
		return mailAdress;
	}
	public void setMailAdress(String mailAdress) {
		this.mailAdress = mailAdress;
	}
	public String getPassword() {
		return decodedPassword;
	}

	
}
